﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Omnia.Library.Extensions
{
    public static class NumberExtension
    {
        public static double ToDouble(this string content)
        {

            double a = 0;
            if (double.TryParse(content, out a))
            {
                return a;
            }
            return 0;
        }

        public static long ToLong(this string content)
        {

            long a = 0;
            if (long.TryParse(content, out a))
            {
                return a;
            }
            return 0;
        }
    }
}
